package com.iking.toolkit.formatdeal.service;

import com.iking.toolkit.formatdeal.enums.FileFormatPathEnum;
import com.iking.toolkit.formatdeal.model.FileFormatConversion;
import com.baomidou.mybatisplus.extension.service.IService;
import com.iking.toolkit.formatdeal.model.dto.SelectByPageDTO;
import com.iking.toolkit.model.Msg;
import com.iking.toolkit.model.PageRes;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * 文件格式转换任务 Service 接口
 * </p>
 *
 * @author lqb
 * @since 2025-08-04
 */
public interface FileFormatConversionService extends IService<FileFormatConversion> {
    /**
     * 执行文件格式转换
     *
     * @param multipartFile
     * @param uploadId
     * @param fileFormatPathEnum
     * @return
     */
    Msg fileFormatConversion(MultipartFile multipartFile, String uploadId, FileFormatPathEnum fileFormatPathEnum);

    /**
     * 根据业务id查询文件格式转换记录
     *
     * @param businessId
     * @return
     */
    Msg<FileFormatConversion> selectByBusinessId(@NotBlank(message = "业务Id不能为空") String businessId);

    /**
     * 分页查询文件格式转换记录
     *
     * @param selectByPageDTO
     * @return
     */
    Msg<PageRes<FileFormatConversion>> selectByPage(@Valid SelectByPageDTO selectByPageDTO);
}
